﻿/********************************************************************************************************************************************
 * 
 *                                                  ClassName:IDirectUIControl
 *                                                  Description:all control Interface
 *                                                  Author:BoBo
 *                                                  Time:2016-08-11
 *                                                  Version:1.0.0.0
 * 
 * *******************************************************************************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Printing;
using System.Text;
using System.Windows.Forms;
using FrameWork.Classes.Data;
using FrameWork.Controls;
using FrameWork.Event;
using PropertyChangingEventArgs = FrameWork.Classes.Data.PropertyChangingEventArgs;

namespace FrameWork.InterFace
{
    public interface IDirectUIControl:IDisposable
    {
        #region 注释

        ///// <summary>
        ///// 控件名称
        ///// </summary>
        //string Name { get; set; }

        ///// <summary>
        ///// 字体
        ///// </summary>
        //System.Drawing.Font Font { get; set; }

        //#region 大小

        ///// <summary>
        ///// 控件工作区域
        ///// </summary>
        //System.Drawing.Rectangle ClientRectangle { get; set; }

        ///// <summary>
        ///// 控件大小
        ///// </summary>
        //System.Drawing.Size Size { get; set; }

        ///// <summary>
        ///// 控件宽度
        ///// </summary>
        //int Width { get; set; }


        ///// <summary>
        ///// 控件高度
        ///// </summary>
        //int Height { get; set; }
        //#endregion

        //#region 图片
        ///// <summary>
        ///// 背景图片
        ///// </summary>
        //System.Drawing.Image BackGroundImage { get; set; }

        ///// <summary>
        ///// 默认图片
        ///// </summary>
        //System.Drawing.Image NormaImage { get; set; }

        ///// <summary>
        ///// 鼠标移上去的时图片
        ///// </summary>
        //System.Drawing.Image MouseEnterImage { get; set; }

        ///// <summary>
        ///// 鼠标按下时的图片
        ///// </summary>
        //System.Drawing.Image MouseDownImage { get; set; }
        //#endregion

        //#region 颜色
        ///// <summary>
        ///// 背景色
        ///// </summary>
        //System.Drawing.Color BackGroundColor { get; set; }

        ///// <summary>
        ///// 前景色
        ///// </summary>
        //System.Drawing.Color ForeColor { get; set; }


        ///// <summary>
        ///// 鼠标移入时的背景色
        ///// </summary>
        //System.Drawing.Color MouseEnterBackGroundColor { get; set; }

        ///// <summary>
        ///// 鼠标按下时的背景色
        ///// </summary>
        //System.Drawing.Color MouseDownBackGrouColor { get; set; }


        ///// <summary>
        ///// 鼠标移入时的前景色
        ///// </summary>
        //System.Drawing.Color MouseEnterForeColor { get; set; }

        ///// <summary>
        ///// 鼠标按下时的前景色
        ///// </summary>
        //System.Drawing.Color MouseDownForeColor { get; set; }



        //#endregion

        ///// <summary>
        ///// 边界
        ///// </summary>
        //System.Drawing.Rectangle Bounds { get; set; }

        ///// <summary>
        ///// 控件上方的Y坐标
        ///// </summary>
        //int Top { get; }

        ///// <summary>
        ///// 控件左边的X坐标
        ///// </summary>
        //int Left { get; }

        ///// <summary>
        ///// 控件下方的Y坐标
        ///// </summary>
        //int Bottom { get; }

        ///// <summary>
        ///// 控件右边的X坐标
        ///// </summary>
        //int Right { get; }


        ///// <summary>
        ///// 指定控件的内部间距
        ///// </summary>
        //System.Windows.Forms.Padding Padding { get; set; }


        ///// <summary>
        ///// 指定控件与另一个控件边距之间的间隔
        ///// </summary>
        //System.Windows.Forms.Padding Margin { get; set; }


        ///// <summary>
        ///// 控件坐标
        ///// </summary>
        //Point Location { get; set; }


        ///// <summary>
        ///// 是否已经初始化完成
        ///// </summary>
        //bool Initializing { get; }

        ///// <summary>
        ///// 原型双缓冲
        ///// </summary>
        //bool IsAncestorDoubleBuffered { get; }
        //bool IsAttached { get; }

        ///// <summary>
        ///// 是否可用
        ///// </summary>
        //bool IsAvailable { get; }

        //bool IsDescendantOf(IContainer container);
        //bool IsDoubleBuffered { get; }
        //bool IsDown { get; }
        //bool IsTransparent { get; }


        //#region 方法
        ///// <summary>
        ///// 开始初始化
        ///// </summary>
        //void BeginInit();

        ///// <summary>
        ///// 结束初始化
        ///// </summary>
        //void EndInit();

        ///// <summary>
        ///// 失效后重绘
        ///// </summary>
        //void Invalidate();

        ///// <summary>
        ///// 离开
        ///// </summary>
        //void Leave();

        ///// <summary>
        ///// 离开可用的激活控件事件
        ///// </summary>
        ///// <returns></returns>
        //bool LeaveNestedFocusedControl();

        //bool OnClick(PrintEventArgs e);
        //void OnDown(PointEventArgs e);
        //void OnEnter(IHost host);
        //void OnKeyDown(System.Windows.Forms.KeyEventArgs e);
        //void OnKeyPress(System.Windows.Forms.KeyPressEventArgs e);
        //void OnKeyUp(System.Windows.Forms.KeyEventArgs e);
        //void OnLeave(IHost host);
        //void OnLostFocus();
        //void OnMove(PaintEventArgs e);
        //void OnPaint(DirectUIPaintEventArgs e);
        //void OnRelease(PointEventArgs e);
        //void OnUp(PointEventArgs e);

        //#endregion


        //#region 事件

        ///// <summary>
        ///// 点击事件
        ///// </summary>
        //event EventHandler Click;

        ///// <summary>
        ///// 前景色改变事件
        ///// </summary>
        //event EventHandler ForeColorChanged;

        ///// <summary>
        ///// 失去焦点事件
        ///// </summary>
        //event EventHandler GotFocus;

        ///// <summary>
        ///// 初始化事件
        ///// </summary>
        //event EventHandler Initialize;


        ///// <summary>
        /////键盘键按下事件
        ///// </summary>
        //event System.Windows.Forms.KeyEventHandler KeyDown;
        ///// <summary>
        ///// 键按下并放开后的事件
        ///// </summary>
        //event System.Windows.Forms.KeyPressEventHandler KeyPress;

        ///// <summary>
        ///// 键放开事件
        ///// </summary>
        //event EventHandler KeyUp;


        ///// <summary>
        ///// 失去焦点事件
        ///// </summary>
        //event EventHandler LostFocus;


        //event EventHandler<DirectUIPaintEventArgs> PaintBackground;


        //event EventHandler<ChangedEventArgs<System.Drawing.Size>> SizeChanged;

        //#endregion


        //#region 委托

        //#endregion

        #endregion

        bool Active { get; }
        System.Windows.Forms.AnchorStyles Anchor { get; set; }
        System.Drawing.Color BackColor { get; set; }
        void BeginInit();
        DataBindingCollection BindingCollection { get; }
        int Bottom { get; }
        System.Drawing.Rectangle Bounds { get; set; }
        bool CanClick { get; }
        event EventHandler Click;
        System.Drawing.Rectangle ClientRectangle { get; }
        void ClipRectangle(ref System.Drawing.Rectangle rect);
        IContainer Container { get; set; }
        System.Drawing.Graphics CreateGraphics();
        void DataBind();

        bool Enabled { get; set; }
        void EndInit();
        void Focus();
        System.Drawing.Font Font { get; set; }
        System.Drawing.Color ForeColor { get; set; }
        event EventHandler ForeColorChanged;
        event EventHandler GotFocus;
        int Height { get; set; }
        event EventHandler Initialize;
        bool Initializing { get; }
        void Invalidate();
        bool IsAncestorDoubleBuffered { get; }
        bool IsAttached { get; }
        bool IsAvailable { get; }
        bool IsDescendantOf(IContainer container);
        bool IsDoubleBuffered { get; }
        bool IsDown { get; }
        bool IsTransparent { get; }
        event System.Windows.Forms.KeyEventHandler KeyDown;
        event System.Windows.Forms.KeyPressEventHandler KeyPress;
        event EventHandler KeyUp;
        void Leave();
        bool LeaveNestedFocusedControl();
        int Left { get; set; }
        event EventHandler LostFocus;
        string Name { get; set; }
        bool NeedDataBind { get; set; }
        bool OnClick(PointEventArgs e);
        void OnDown(PointEventArgs e);
        void OnEnter(IHost host);
        void OnGesture(GestureEventArgs e);
        void OnKeyDown(System.Windows.Forms.KeyEventArgs e);
        void OnKeyPress(System.Windows.Forms.KeyPressEventArgs e);
        void OnKeyUp(System.Windows.Forms.KeyEventArgs e);
        void OnLeave(IHost host);
        void OnLostFocus();
        void OnMove(PointEventArgs e);
        void OnPaint(DirectUIPaintEventArgs e);
        void OnRelease(PointEventArgs e);
        void OnUp(PointEventArgs e);
        event EventHandler<DirectUIPaintEventArgs> PaintBackground;
        DirectUIControl Parent { get; }
        event EventHandler ParentChanged;
        void PerformClick();
        event EventHandler<PropertyChangingEventArgs> PropertyChanged;
        void Refresh();
        int Right { get; }
        void Scale(System.Drawing.SizeF scaleFactor);
        System.Drawing.SizeF ScaleFactor { get; set; }
        int ScaleX(int value);
        int ScaleY(int value);
        System.Drawing.Rectangle ScreenBounds { get; }
        bool Selectable { get; }
        void SetBinding(string properyName, DataBinding binding);
        event EventHandler<ChangedEventArgs<System.Drawing.Size>> SizeChanged;
        int Top { get; set; }
        int UnscaleX(int value);
        int UnscaleY(int value);
        void Update();
        bool Visible { get; set; }
        event EventHandler VisibleChanged;
        int Width { get; set; }




    }
}
